import React,{useState,useEffect} from 'react'
import "./index.less"

// vant组件
import {NavBar} from "react-vant"
let name = ''
export default function GroupChat(props) {
    console.log(props);
    // 返回
    const back = () => {
        props.history.push(props.location.state.path)
    }
    // const [name] = useState('')
    useEffect(() => {
        props.location.state.forEach((item) => {
            name += item.remark
        })
    }, [])
    console.log(name,'asdsaf');
    return (
        <div className='groupChat'>
            <header>
                <NavBar
                    title={name}
                    style={{ backgroundColor: "#ededed" }}
                    leftArrow
                    rightText={
                        <span>
                           <svg className='icon search' aria-hidden='true' style={{ fontSize: "17px" }}>
                                <use xlinkHref="#icon-sousuo1"></use>
                            </svg>
                        </span>
                    }
                    onClickLeft={back}
                />
            </header>
        </div>
    )
}
